import App from './App'
import store from './store'
import Utils from './common/utils.js'
import Util from './common/util.js'
import Http from './common/http.js'
import upload from './common/upload.js'
import Api from './common/api.js'
import qaes from '@/js_sdk/Qiepro-Aes/Qiepro-Aes/Qiepro-Aes.js'
import AES from '@/js_sdk/ar-aes/ar-aes.js'
import AESUTILS from '@/js_sdk/aesutils/aes_utils.js'
import Config from './common/config.js'
import Preutils from './common/preutils.js'
import Oauth from './common/oauth.js'
import Check from './common/check.js'

// #ifndef VUE3
import Vue from 'vue'
App.mpType = 'app'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView);

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.$util = Utils
Vue.prototype.util = Util
Vue.prototype.preutils = Preutils;
Vue.prototype.baseUrl = Config
Vue.prototype.http = Http
Vue.prototype.upload = upload
Vue.prototype.api = Api
Vue.prototype.check = Check
Vue.prototype.oauth = Oauth
Vue.prototype.qaes = qaes
Vue.prototype.AES = AES
Vue.prototype.aes_utils = AESUTILS

Vue.prototype.$adpid = "1111111111"
Vue.prototype.$serviceMobile = "15092939826"
Vue.prototype.$backgroundAudioData = {
	playing: false,
	playTime: 0,
	formatedPlayTime: '00:00:00'
}


//常用组件
import loadingCover from '@/components/loading-cover/loading-cover.vue';
Vue.component('loading-cover', loadingCover);

import fswEmpty from '@/components/fsw-empty/fsw-empty.vue';
Vue.component('fsw-empty', fswEmpty);

import nsEmpty from '@/components/ns-empty/ns-empty.vue';
Vue.component('ns-empty', nsEmpty);

import fswSteps from '@/components/fsw-steps/fsw-steps.vue';
Vue.component('fsw-steps', fswSteps);

import MyMescrollUni from "@/components/mescroll-uni/my-list-mescroll.vue";
Vue.component("my-mescroll-uni", MyMescrollUni); //上拉加载,下拉刷新组件


import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue";
Vue.component("mescroll-uni", MescrollUni); //上拉加载,下拉刷新组件

import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
Vue.component('mescroll-body', MescrollBody);

// import nsShowToast from '@/components/ns-show-toast/ns-show-toast.vue';
// Vue.component('ns-show-toast', nsShowToast);

const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	app.use(store)
	app.use(Utils)
	app.config.globalProperties.$adpid = "1111111111"
	app.config.globalProperties.$backgroundAudioData = {
		playing: false,
		playTime: 0,
		formatedPlayTime: '00:00:00'
	}
	return {
		app
	}
}
// #endif
